package skcomms.NateOnBiz.util;

import java.util.Locale;

import skcomms.NateOnBiz.NateApp;

public class GeneralDefinition {

	public static final String DEFINITION_SEPARATOR = ".";

	public static final String AREA_KOREA = "KO";
	public static final String AREA_ENGLISH = "EN";
	public static final String AREA_CHINA = "CN";

	public static final int MEDIA_TYPE_MOBILE = 2;

	public static final String ENC_TYPE_RAW = "RAW";
	public static final String ENC_TYPE_BASE16 = "BASE16";
	public static final String ENC_TYPE_BASE64 = "BASE64";

	public static final String CHAR_TYPE_UTF8 = "UTF8";
	public static final String CHAR_TYPE_UTF16 = "UTF16";

	public static final String MSG_OBJECT = "msgObj";
	
	public static final String HASH_TYPE = "HASHTYPE";
	public static final String HASH_TYPE_ERROR = "error";
	public static final String HASH_TYPE_SUCC = "succ";
	public static final String HASH_TYPE_CANCEL= "canc";
	public static final String HASH_ERROR_CODE = "errc";
	public static final String HASH_ERROR_MSG = "errm";
	public static final String HASH_TYPE_UPDATE = "update";
	public static final String HASH_UPDATE_PATH = "update_path";
	
	public static final String HASH_UPDATE_TYPE_RECOMMAND = "update_recommand";
	public static final String HASH_UPDATE_TYPE_FORCE = "update_force";
	public static final String HASH_UPDATE_TYPE = "update_type";
	
	public static final String NOT_USE = "null";
	public static final String AUTHORIZED_USER = "ywp042@cc.msft";
	// ywp042@cc.msft
	// shpark@cc.msft

	public static final int DPL_CONNECTION = 0;
	public static final int DP_CONNECTION = 1;

	public static final boolean THREAD_RUNNING = true;
	public static final boolean THREAD_STOP = false;

	// Login Type
	public static final String LOGIN_TYPE_MOBILE = "M";
	public static final String LOGIN_TYPE_IDPSWD = "P";

	
	

	public static String getCurDeviceLanguage() {

		String val = "";
		Locale systemLocale = NateApp.getContext().getResources().getConfiguration().locale;
		val = systemLocale.getLanguage();
		
		if (val.equals("ko")) {
			val = "KOR";
		} else if (val.equals("en")) {
			val = "ENG";
		} else if (val.equals("ch") || val.equals("cn")) {
			val = "CHN";
		}
		return val;
	}
}
